import request from '@/utils/request'

// 查询公告栏列表
export function listBulletin(query) {
    return request({
        url: '/system/bulletin/list',
        method: 'get',
        params: query
    })
}

// 查询公告栏详细
export function getBulletin(bulletinId) {
    return request({
        url: '/system/bulletin/' + bulletinId,
        method: 'get'
    })
}

// 新增公告栏
export function addBulletin(data) {
    return request({
        url: '/system/bulletin',
        method: 'post',
        data: data
    })
}

// 修改公告栏
export function updateBulletin(data) {
    return request({
        url: '/system/bulletin',
        method: 'put',
        data: data
    })
}

// 删除公告栏
export function delBulletin(bulletinId) {
    return request({
        url: '/system/bulletin/' + bulletinId,
        method: 'delete'
    })
}

// 批量发送公告栏
export function batchSend(bulletinId) {
    return request({
        url: '/system/bulletin/batchSend/' + bulletinId,
        method: 'post'
    })
}

// 批量阅读收件箱
export function batchRead(bulletinId) {
    return request({
        url: '/system/bulletin/recive/batchRead/' + bulletinId,
        method: 'put'
    })
}

// 删除收件箱公告
export function delReceiveBulletin(bulletinId) {
    return request({
        url: '/system/bulletin/recive/' + bulletinId,
        method: 'delete'
    })
}

// 查询收件箱列表
export function listReceiveBulletin(query) {
    return request({
        url: '/system/bulletin/recive/list',
        method: 'get',
        params: query
    })
}

// 删除回收站收件箱公告
export function delReceiveDelBulletin(bulletinId) {
    return request({
        url: '/system/bulletin/recive/delete/' + bulletinId,
        method: 'delete'
    })
}

// 删除回收站已发送公告
export function delDelBulletin(bulletinId) {
    return request({
        url: '/system/bulletin/delete/' + bulletinId,
        method: 'delete'
    })
}